28215d4c7919f3b4aabb94374f21a3cb39dac44b
[git-annex.git] /
1 [[!comment format=mdwn
2  username="joey"
3  subject="""comment 3"""
4  date="2023-03-23T19:50:45Z"
5  content="""
6 git-annex is what writes that detached HEAD,
7 in updateAdjustedBranch. And I've verified that when it fails like this,
8 git status shows the file is modified. But of course the modification is
9 only that the annex content has been replaced by an annex pointer. Running
10 `git add` on the file makes the modification status go away.
11
12 And this only happens when annex.adjustedbranchrefresh=1.
13 At higher values, it calls Annex.Queue.flush, but at 1 it does not, and so 
14 restagePointerFiles does not get called before adjustedBranchRefreshFull.
15 (Or at least may not, they're both running as cleanup actions and order is
16 not really defined.)
17
18 I wonder if there are other situations where modifications can prevent
19 checkout of the updated adjusted branch? Eg, what if the user has made some
20 other modification to an annexed file? It seems wise for git-annex to
21 defend against it in depth, by making sure no crash can leave it in
22 detached head state.
23 """]]